home *** CD-ROM | disk | FTP | other *** search
/ Network CD 1 / Network CD.iso / amospd / 481-490 / apd488 / routines.asc < prev    next >
Encoding:
Text File  |  1987-03-30  |  27.7 KB  |  877 lines

  1. ` INNOVATIONS 1992
  2. `
  3. `If you find any of this code/data (not that you will mind), then use it
  4. `I`m not a grouch, but a generous sole, I wont say
  5. `for example, "I DONT WANNA SEE ANY OF MY CODE IN YOUR PROGRAMS"
  6. `on the contrary "USE IT AS MUCH AS YOU LIKE!"
  7. `you dont have to credit me if you dont wont to. 
  8. `
  9. `Oh well, I decided to stick some source
  10. `some of the more advanced users will not find this
  11. `code any use really, but feel free to browse
  12. `As you can see, the code is fairly well structured
  13. `(even uses parameters), so I hope this makes reading it
  14. `more meaningfull. 
  15. `This demo (if you can call it one), was written, in
  16. `5 days(yes five days), and compiled in another day
  17. `given the gremlins!
  18. `There are 1 or 2 bits of code I could not include
  19. `for example, the fractal generator, is too big to
  20. `fit on the disk which is already 99% full, sorry about this, but
  21. `all main programs have been packed as much as possible
  22. `to allow for some of this source.
  23.  
  24. `Any comments, then write to me, address can be found
  25. `at end of demo.
  26.  
  27. Screen Open 1,320,200,2,Lowres
  28. Curs Off : Flash Off : Cls 0 : Hide On 
  29.  
  30. * kill the multi-tasking, for more CPU time
  31.  
  32. D=Execall(-132)
  33. Load "df0:ins1"
  34.  
  35. Music 1
  36.  
  37. Get Disc Fonts 
  38. Set Font 2
  39. Set Font 1
  40. Get Rom Fonts 
  41. Global MESSAGE,A$,I
  42. Degree 
  43. Load "df0:in001"
  44. ST1
  45. ST2
  46. ST3
  47. _INTRO
  48. Erase 10 : Erase 11
  49. MESSAGE=1
  50. ` _text_up_down[waitingtime,true or false for loading something,load request number]
  51.  
  52. _TEXT_INFORMATION
  53. _TEXT_UP_DOWN[600,F,0]
  54. MESSAGE=2
  55. _TEXT_INFORMATION
  56. _TEXT_UP_DOWN[500,F,0]
  57. MESSAGE=3
  58. _TEXT_INFORMATION
  59. _TEXT_UP_DOWN[350,F,0]
  60. CHAOS_FRACTAL
  61. MESSAGE=4
  62. _TEXT_INFORMATION
  63. _TEXT_UP_DOWN[300,T,1]
  64. _ZOOM_SCREEN
  65. MESSAGE=5
  66. _TEXT_INFORMATION
  67. _TEXT_UP_DOWN[300,F,0]
  68. PICCY
  69. MESSAGE=6
  70. _TEXT_INFORMATION
  71. _TEXT_UP_DOWN[500,T,2]
  72. CUBES_480
  73. Screen Close 3
  74. MESSAGE=7
  75. _TEXT_INFORMATION
  76. _TEXT_UP_DOWN[450,T,3]
  77. _INTRO_SETUP
  78. SET_UP_DETAILS
  79. MOVE_STARS
  80. MESSAGE=8
  81. _TEXT_INFORMATION
  82. _TEXT_UP_DOWN[500,F,0]
  83. MAKE_PICCY
  84. MESSAGE=9
  85. _TEXT_INFORMATION
  86. _TEXT_UP_DOWN[500,F,0]
  87. MULTI_SCROLL
  88. `fade music
  89. For TT=63 To 1 Step -1
  90.    Mvolume TT : Wait Vbl 
  91. Next TT
  92. Music Off 
  93. Erase 3 : Erase 12 : Erase 1
  94. `run copper program 
  95. Run "df0:curves"
  96.  
  97. Procedure _INTRO
  98.    Screen Open 2,340,200,32,Lowres
  99.    Curs Off : Flash Off : Cls 0 : Hide On 
  100.    Unpack 7 To 2
  101.    Hide On : Erase 7
  102.    Screen Open 1,340,275,16,Lowres
  103.    Load "df0:innovation-logo"
  104.    Curs Off : Flash Off : Cls 0 : Hide On 
  105.    Load "df0:a0001",10
  106.    Load "df0:a0002",11
  107.    Palette $0,$F,$F,$F,$F,$F,$F,$F,$F,$F,$F,$F,$F
  108.    Screen Open 0,340,256,2,Lowres : Double Buffer : Autoback 0
  109.    Hide On : Curs Off 
  110.    Screen Display 0,130,,,
  111.    Screen Offset 0,7,
  112.    Colour 1,$F
  113.    REG=Start(10)
  114.    REG2=Start(11)
  115.    For R=1 To 140 Step 2
  116.       Cls 0
  117.       Polygon Deek(REG),Deek(REG+2) To Deek(REG+4),Deek(REG+6) To Deek(REG+8),Deek(REG+10) To Deek(REG+12),Deek(REG+14) To Deek(REG+16),Deek(REG+18) To Deek(REG),Deek(REG+2)
  118.       Add REG,20
  119.       Screen Swap 
  120.       Wait Vbl 
  121.    Next R
  122.    For N=0 To 45
  123.       Cls 0
  124.       Polygon Deek(REG2),Deek(REG2+2) To Deek(REG2+4),Deek(REG2+6) To Deek(REG2+8),Deek(REG2+10) To Deek(REG2+12),Deek(REG2+14) To Deek(REG2+16),Deek(REG2+18) To Deek(REG2),Deek(REG2+2)
  125.       Add REG2,20
  126.       Screen Swap : Wait Vbl 
  127.       If REG2=Start(11)+400 Then Exit 
  128.    Next N
  129.    Cls 0
  130.    X=58 : X1=260 : Y=26 : Y1=229
  131.    Bar 58,26 To 260,229
  132.    For X=58 To -20 Step -1
  133.       Cls 0
  134.       Bar X,Y To X1,Y1
  135.       Screen Swap : Wait Vbl : Inc X1 : Inc Y : Dec Y1
  136.    Next X
  137.    Screen 1
  138.    Autoback 1
  139.    Screen Copy 0 To 1 : Screen To Front 1
  140.    Colour 13,$F : Ink 13 : Paint 50,110
  141.    Screen Display 1,130,,, : Screen Offset 1,7,
  142.    Paste Bob 11,110,1
  143.    Fade 3,$0,$F,$11F,$22F,$33F,$44F,$55F,$66F,$77F,$88F,$99F,$AAF,$BBF,$0,$0
  144.    Wait 45
  145.    Fade 4,$5,,,,,,,,,,,,,$5 : Wait 60
  146.    X=0 : X1=339 : Y=109 : Y1=146
  147.    Ink 12
  148.    Autoback 0
  149.    For X=0 To 339
  150.       Plot X,Y : Plot X1,Y1
  151.       Dec X1
  152.       Screen Swap 
  153.    Next X
  154.    Ink 12
  155.    X=0
  156.    Colour 14,$0
  157.    Double Buffer 
  158.    Autoback 0
  159.    Get Bob 1,2,0,108 To 335,150
  160.    Paste Bob 0,Y,2
  161.    For Y=109 To 0 Step -1
  162.       Paste Bob 0,Y,2
  163.       Screen Swap : Wait Vbl 
  164.    Next Y
  165. End Proc
  166.  
  167. Procedure _TEXT_INFORMATION
  168.    Screen Open 0,320,200,8,Lowres
  169.    Curs Off : Flash Off : Cls 0 : Hide On 
  170.    Palette $5,$888,$999,$AAA,$BBB,$CCC,$DDD,$EEE
  171.    Screen Display 0,,320,,
  172.    Set Rainbow 3,1,4096,"(15,1,15)(15,-1,15)","(1,1,10)(1,-1,10)","(10,1,10)(10,-1,10)"
  173.    Ink 1,0
  174.    Set Font 3
  175.  
  176. ` Notice the absence of gotos in any of this code(yeuch)
  177.  
  178.    If MESSAGE=1 Then Gosub MESSAGE1
  179.    If MESSAGE=2 Then Gosub MESSAGE2
  180.    If MESSAGE=3 Then Gosub MESSAGE3
  181.    If MESSAGE=4 Then Gosub MESSAGE4
  182.    If MESSAGE=5 Then Gosub MESSAGE5
  183.    If MESSAGE=6 Then Gosub MESSAGE6
  184.    If MESSAGE=7 Then Gosub MESSAGE7
  185.    If MESSAGE=8 Then Gosub MESSAGE8
  186.    If MESSAGE=9 Then Gosub MESSAGE9
  187.    Pop Proc
  188.    MESSAGE1:
  189.    A$="MACH II"
  190.    Text 165-Len(A$)*8/2,10,A$
  191.    A$="Yes innovations are back"
  192.    Text 165-Len(A$)*8/2,30,A$
  193.    A$="bigger, brighter and better than ever"
  194.    Text 165-Len(A$)*8/2,40,A$
  195.    A$="Lets show you some more tricks"
  196.    Text 165-Len(A$)*8/2,50,A$
  197.    A$="Freestyle was nice, but this is better."
  198.    Text 165-Len(A$)*8/2,70,A$
  199.    A$="Yes this demo, was compiled very quickly"
  200.    Text 165-Len(A$)*8/2,80,A$
  201.    A$="but has some nice original stuff I've"
  202.    Text 165-Len(A$)*8/2,100,A$
  203.    A$="not seen before (I think) in Amos."
  204.    Text 165-Len(A$)*8/2,110,A$
  205.    A$="Hopefully its a bit different......."
  206.    Text 165-Len(A$)*8/2,120,A$
  207.    A$="Lets get this demo rolling, first contents"
  208.    Text 165-Len(A$)*8/2,165,A$
  209.    Return 
  210.    MESSAGE2:
  211.    A$="CONTENTS"
  212.    Text 165-Len(A$)*8/2,10,A$
  213.    A$="        ----------------"
  214.    Text 165-Len(A$)*8/2,20,A$
  215.    A$="Chaos fractal"
  216.    Text 165-Len(A$)*8/2,40,A$
  217.    A$="Full screen zoom"
  218.    Text 165-Len(A$)*8/2,60,A$
  219.    A$="Some nice graphics and scrolly"
  220.    Text 165-Len(A$)*8/2,80,A$
  221.    A$="3D bubble world - honest!"
  222.    Text 165-Len(A$)*8/2,100,A$
  223.    A$="More scrollies!!!!!!!!!!!"
  224.    Text 165-Len(A$)*8/2,120,A$
  225.    A$="Curvacious cube & scroll with reflections"
  226.    Text 165-Len(A$)*8/2,140,A$
  227.    A$="3d starfield - no dual playfield used!"
  228.    Text 165-Len(A$)*8/2,160,A$
  229.    A$="The credits and some info!"
  230.    Text 165-Len(A$)*8/2,180,A$
  231.    Return 
  232.    MESSAGE3:
  233.    A$="Lets start off with a nice chaos fractal"
  234.    Text 165-Len(A$)*8/2,10,A$
  235.    A$="Using a very simple formula but still"
  236.    Text 165-Len(A$)*8/2,30,A$
  237.    A$="very nice. Its precalculated of course"
  238.    Text 165-Len(A$)*8/2,50,A$
  239.    A$="because its soooow slow in realtime."
  240.    Text 165-Len(A$)*8/2,70,A$
  241.    A$="So lets have a look, and appreciate the"
  242.    Text 165-Len(A$)*8/2,90,A$
  243.    A$="mathematics involved................."
  244.    Text 165-Len(A$)*8/2,110,A$
  245.    Return 
  246.    MESSAGE4:
  247.    A$="Very nice, but now lets move on!"
  248.    Text 165-Len(A$)*8/2,10,A$
  249.    A$="Ever been jealous and teased"
  250.    Text 165-Len(A$)*8/2,30,A$
  251.    A$="that Amos cant handle Zoom"
  252.    Text 165-Len(A$)*8/2,50,A$
  253.    A$="effexs. Well worry no more"
  254.    Text 165-Len(A$)*8/2,70,A$
  255.    A$="this is a very powerful and"
  256.    Text 165-Len(A$)*8/2,90,A$
  257.    A$="simple method.............."
  258.    Text 165-Len(A$)*8/2,110,A$
  259.    A$="Watch the screen very carefully!"
  260.    Text 165-Len(A$)*8/2,130,A$
  261.    Return 
  262.    MESSAGE5:
  263.    A$="Well, impressed, you should be"
  264.    Text 165-Len(A$)*8/2,10,A$
  265.    A$="that was all in one frame"
  266.    Text 165-Len(A$)*8/2,30,A$
  267.    A$="That certainly makes all the"
  268.    Text 165-Len(A$)*8/2,50,A$
  269.    A$="difference to the slow amos zoom"
  270.    Text 165-Len(A$)*8/2,70,A$
  271.    A$="As you can see from the last demo"
  272.    Text 165-Len(A$)*8/2,90,A$
  273.    A$="the message routine is much improved "
  274.    Text 165-Len(A$)*8/2,110,A$
  275.    A$="more friendlier and versatile."
  276.    Text 165-Len(A$)*8/2,130,A$
  277.    A$="Now some GFX from marc!"
  278.    Text 165-Len(A$)*8/2,150,A$
  279.    A$="This ones an ugly looking brute!"
  280.    Text 165-Len(A$)*8/2,170,A$
  281.    Return 
  282.    MESSAGE6:
  283.    A$="Well a nice little pic by Marc"
  284.    Text 165-Len(A$)*8/2,10,A$
  285.    A$="O.k I've seen 24,48,64 animated vector"
  286.    Text 165-Len(A$)*8/2,30,A$
  287.    A$="objects in an amos demo. But lets destroy"
  288.    Text 165-Len(A$)*8/2,50,A$
  289.    A$="that. 480, and in hires interlaced mode."
  290.    Text 165-Len(A$)*8/2,70,A$
  291.    A$="Is that possible?. Yep, easy and simple"
  292.    Text 165-Len(A$)*8/2,90,A$
  293.    A$="I think you will like this a lot."
  294.    Text 165-Len(A$)*8/2,110,A$
  295.    A$="An Amos first and a record I think!"
  296.    Text 165-Len(A$)*8/2,130,A$
  297.    A$="However I think its very interesting"
  298.    Text 165-Len(A$)*8/2,150,A$
  299.    A$="in 50 frames a sec dont you........."
  300.    Text 165-Len(A$)*8/2,170,A$
  301.    Return 
  302.    MESSAGE7:
  303.    A$="Innovations Send Greets to:-"
  304.    Text 165-Len(A$)*8/2,10,A$
  305.    A$="Jag and Shockwave of Fanatix"
  306.    Text 165-Len(A$)*8/2,30,A$
  307.    A$="Graphic reality - Hi guys!"
  308.    Text 165-Len(A$)*8/2,50,A$
  309.    A$="All the Syntex group"
  310.    Text 165-Len(A$)*8/2,70,A$
  311.    A$="Futurize, Fumble, Zirus and Cybernetics"
  312.    Text 165-Len(A$)*8/2,90,A$
  313.    A$="Len and Anne Tucker, Jason Holborn"
  314.    Text 165-Len(A$)*8/2,110,A$
  315.    A$="Lets take a trip into bubble space!"
  316.    Text 165-Len(A$)*8/2,130,A$
  317.    Return 
  318.    MESSAGE8:
  319.    A$="Wowsers, that was in 50 frames and not"
  320.    Text 165-Len(A$)*8/2,10,A$
  321.    A$="at all pre-calculated, which should get"
  322.    Text 165-Len(A$)*8/2,30,A$
  323.    A$="a few other coders buzzing. "
  324.    Text 165-Len(A$)*8/2,50,A$
  325.    A$="Now lets see a real horrific pic"
  326.    Text 165-Len(A$)*8/2,70,A$
  327.    A$="from marc (stryx). This is one of my"
  328.    Text 165-Len(A$)*8/2,90,A$
  329.    A$="favourites, and still oozes of quality."
  330.    Text 165-Len(A$)*8/2,110,A$
  331.    A$="Incidently these graphics are 100% hand"
  332.    Text 165-Len(A$)*8/2,130,A$
  333.    A$="drawn not ripped from other demos."
  334.    Text 165-Len(A$)*8/2,150,A$
  335.    A$="So you've seen them here first........."
  336.    Text 165-Len(A$)*8/2,170,A$
  337.    Return 
  338.    MESSAGE9:
  339.    A$="There you are, impressive eh!!!!!!!!!!!"
  340.    Text 165-Len(A$)*8/2,10,A$
  341.    A$="O.k lets bliterize the screen, yep more"
  342.    Text 165-Len(A$)*8/2,30,A$
  343.    A$="scrollies, but at different speeds and"
  344.    Text 165-Len(A$)*8/2,50,A$
  345.    A$="some with different text, and super high"
  346.    Text 165-Len(A$)*8/2,70,A$
  347.    A$="resolutions in most cases. Can you read"
  348.    Text 165-Len(A$)*8/2,90,A$
  349.    A$="the different messages in one go?"
  350.    Text 165-Len(A$)*8/2,110,A$
  351.    A$="oh Yeh the font is non boring!. Most"
  352.    Text 165-Len(A$)*8/2,130,A$
  353.    A$="importantly it runs in 50 frames, which"
  354.    Text 165-Len(A$)*8/2,150,A$
  355.    A$="is quite neat......................... "
  356.    Text 165-Len(A$)*8/2,170,A$
  357.    Return 
  358. End Proc
  359. Procedure _TEXT_UP_DOWN[TIM,EXCEPTION,NO]
  360.    For Y=320 To 100 Step -4
  361.       Screen Display 0,,Y,,
  362.       Rainbow 3,80,Y,220
  363.       Wait Vbl 
  364.    Next Y
  365.    If EXCEPTION=T and NO=1 Then Load "df0:a0003"
  366.    If EXCEPTION=T and NO=2 Then Load "df0:futhercubeanims"
  367.    If EXCEPTION=T and NO=3 Then Load "df0:b001"
  368.    For PAUSE=1 To TIM : Wait Vbl 
  369.       If Mouse Key=1 Then Exit 
  370.    Next PAUSE
  371.    For Y=100 To 320 Step 4
  372.       Screen Display 0,,Y,,
  373.       Rainbow 3,80,Y,220
  374.       Wait Vbl 
  375.    Next Y
  376.    Cls 0
  377.    Pop Proc
  378. End Proc
  379. `simple pause loop, with in-built escape (mouse button)
  380. `Amos wait is not really adequate
  381.  
  382. Procedure PAUSE[TIM]
  383.    For PAUSE=0 To TIM
  384.       Wait Vbl : If Mouse Key=1 Then Exit 
  385.    Next PAUSE
  386.    Pop Proc
  387. End Proc
  388.  
  389. `As mentioned, fractal stored as packed pic, amos is
  390. `too slow, so what`s the point in making you watch for
  391. `5-10 minutes whilst a fractal is drawing
  392.  
  393. Procedure CHAOS_FRACTAL
  394.    X=0 : Y=0 : X1=1 : Y1=200
  395.    Screen Display 1,,42,,
  396.    Screen Open 3,330,200,32,Lowres
  397.    Curs Off : Flash Off : Cls 0 : Colour 0,$5
  398.    Screen Display 3,,82,,
  399.    Get Palette 2
  400.    Colour 0,$5
  401.    Repeat 
  402.       Screen Copy 2,X,Y,X1,Y1 To 3,X,0
  403.       Wait Vbl : Inc X : Inc X1
  404.    Until X=330
  405.    PAUSE[300]
  406.    Y=82
  407.    For Y=82 To 350 Step 10
  408.       Screen Display 3,,Y,,
  409.       Wait Vbl 
  410.    Next Y
  411.    Screen Close 3 : Screen Close 2
  412. End Proc
  413.  
  414. Procedure _ZOOM_SCREEN
  415.    Screen Open 2,340,265,2,Lowres
  416.    Curs Off : Flash Off : Cls 0 : Hide On 
  417.    Palette $4,$FFF
  418.    POS=384 : POS2=42
  419.    Screen Display 2,112,POS,,
  420.    Double Buffer 
  421.    Autoback 0
  422.    Make Mask 
  423.    X=41 : X1=119 : X2=-36 : X3=196
  424.    Y4=96 : Y3=88 : Y2=80 : Y1=72 : Y=64
  425.    Y5=104 : Y6=112 : Y7=120 : Y8=128
  426.    Timer=0
  427.    For POS=385 To 35 Step -5
  428.       Screen Display 2,,POS,,
  429.       Screen Display 1,,POS2,, : Wait Vbl 
  430.       If POS=85 or POS<85 Then Add POS2,-5
  431.    Next POS
  432.  
  433. `This routine is cheating, but I think it is effective
  434.  
  435.    Do 
  436.       If Z>500 Then FLAG=1
  437.       For T=1 To 25
  438.          Z=Timer
  439.          If FLAG=0 Then Cls 0
  440.          Paste Bob X2,Y,T : Paste Bob X,Y,T : Paste Bob X1,Y,T : Paste Bob X3,Y,T
  441.          Paste Bob X2,Y1,T : Paste Bob X,Y1,T : Paste Bob X1,Y1,T : Paste Bob X3,Y1,T
  442.          Paste Bob X2,Y2,T : Paste Bob X,Y2,T : Paste Bob X1,Y2,T : Paste Bob X3,Y2,T
  443.          Paste Bob X2,Y3,T : Paste Bob X,Y3,T : Paste Bob X1,Y3,T : Paste Bob X3,Y3,T
  444.          Paste Bob X2,Y4,T : Paste Bob X,Y4,T : Paste Bob X1,Y4,T : Paste Bob X3,Y4,T
  445.          Paste Bob X2,Y5,T : Paste Bob X,Y5,T : Paste Bob X1,Y5,T : Paste Bob X3,Y5,T
  446.          Paste Bob X2,Y6,T : Paste Bob X,Y6,T : Paste Bob X1,Y6,T : Paste Bob X3,Y6,T
  447.          Paste Bob X2,Y7,T : Paste Bob X,Y7,T : Paste Bob X1,Y7,T : Paste Bob X3,Y7,T
  448.          Paste Bob X2,Y8,T : Paste Bob X,Y8,T : Paste Bob X1,Y8,T : Paste Bob X3,Y8,T
  449.          Add X2,-6 : Add X,-2 : Add X1,2 : Add X3,6
  450.          Add Y3,-2 : Add Y2,-4 : Add Y1,-6 : Add Y,-8
  451.          Add Y5,2 : Add Y6,4 : Add Y7,6 : Add Y8,8
  452.          Screen Swap : Wait Vbl 
  453.          If Mouse Key Then FLAG=1
  454.       Next T
  455.       If FLAG=1 Then Fade 3,$FFF : Wait 40 : Gosub CLEAR_IT : Pop Proc
  456.       For T=25 To 1 Step -1
  457.          Cls 0
  458.          Paste Bob X2,Y,T : Paste Bob X,Y,T : Paste Bob X1,Y,T : Paste Bob X3,Y,T
  459.          Paste Bob X2,Y1,T : Paste Bob X,Y1,T : Paste Bob X1,Y1,T : Paste Bob X3,Y1,T
  460.          Paste Bob X2,Y2,T : Paste Bob X,Y2,T : Paste Bob X1,Y2,T : Paste Bob X3,Y2,T
  461.          Paste Bob X2,Y3,T : Paste Bob X,Y3,T : Paste Bob X1,Y3,T : Paste Bob X3,Y3,T
  462.          Paste Bob X2,Y4,T : Paste Bob X,Y4,T : Paste Bob X1,Y4,T : Paste Bob X3,Y4,T
  463.          Paste Bob X2,Y5,T : Paste Bob X,Y5,T : Paste Bob X1,Y5,T : Paste Bob X3,Y5,T
  464.          Paste Bob X2,Y6,T : Paste Bob X,Y6,T : Paste Bob X1,Y6,T : Paste Bob X3,Y6,T
  465.          Paste Bob X2,Y7,T : Paste Bob X,Y7,T : Paste Bob X1,Y7,T : Paste Bob X3,Y7,T
  466.          Paste Bob X2,Y8,T : Paste Bob X,Y8,T : Paste Bob X1,Y8,T : Paste Bob X3,Y8,T
  467.          Add X2,6 : Add X,2 : Add X1,-2 : Add X3,-6
  468.          Add Y3,2 : Add Y2,4 : Add Y1,6 : Add Y,8
  469.          Add Y5,-2 : Add Y6,-4 : Add Y7,-6 : Add Y8,-8
  470.          Screen Swap : Wait Vbl 
  471.          If Mouse Key Then FLAG=1
  472.       Next T
  473.    Loop 
  474.    Pop Proc
  475.    CLEAR_IT:
  476.    For POS=35 To 385 Step 5
  477.       Screen Display 1,,POS2,,
  478.       Screen Display 2,,POS,, : Wait Vbl 
  479.       If POS=35 or POS<85 Then Add POS2,5
  480.    Next POS
  481.    Screen Close 2
  482.    Return 
  483. End Proc
  484.  
  485. Procedure PICCY
  486.    Screen 1
  487.    Fade 2,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5 : Wait 25
  488.    Unpack 8 To 6 : Colour 0,$5
  489.  
  490. ` I`ve actaully blocked off this routine. All it does is
  491. ` draws the piccy on the screen in a nicer way.
  492. ` But the damn thing failed to compile, probably too much
  493. ` packed stuff in memory! when this screen was opened,but I cant be sure.
  494.  
  495.    '   Screen Open 7,320,200,32,Lowres
  496.    '   Curs Off : Flash Off : Cls 0 : Hide On 
  497.    '   Double Buffer : Autoback 0 
  498.    '   Get Palette 6
  499.    '   Colour 0,$5
  500.    '   Screen Display 7,130,90,320,200
  501.    '   Q=160 : W=83 : X=161 : Y=85
  502.    '   Repeat 
  503.    '      Screen Copy 6,Q,W,X,Y To 7,Q,W-20 
  504.    '      Add Q,-2 : Add W,-2 : Add X,2 : Add Y,2 
  505.    '      Screen Swap : Wait Vbl  
  506.    '   Until Q<-42
  507.    '   For COUNTER=1 To 380 : Wait Vbl : If Mouse Key Then Exit : Next COUNTER
  508.    '   Ink 0
  509.    '   Repeat 
  510.    '      Box Q,W To X,Y : Box Q+1,W+1 To X-1,Y-1 : Screen Swap : Wait Vbl  
  511.    '      Inc Q : Inc W : Dec X : Dec Y 
  512.    '   Until Q=160
  513.    Repeat 
  514.    Until Mouse Key
  515.    Fade 3,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5
  516.    Wait 40
  517.    Screen To Front 1 : Screen 1
  518.    Fade 2,$5,$F,$11F,$22F,$33F,$44F,$55F,$66F,$77F,$88F,$99F,$AAF,$BBF
  519.    Wait 25
  520.    Screen Close 6
  521. End Proc
  522.  
  523. ` 480 cubes, what a laugh, this started out a joke, but
  524. ` its fun to see how much you can stuff on the screen
  525.  
  526. Procedure CUBES_480
  527.    Screen 1
  528.    Fade 2,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5 : Wait 25
  529.    POS=10 : POS1=171
  530.    Screen Open 5,340,160,2,Lowres
  531.    Curs Off : Flash Off : Cls 0 : Hide On 
  532.    Autoback 0
  533.    Palette $5
  534.    Screen Display 5,,POS,,
  535.    Screen Open 6,340,160,2,Lowres
  536.    Curs Off : Flash Off : Cls 0 : Hide On 
  537.    Autoback 0
  538.    Palette $5
  539.    Screen Display 6,,171,,
  540.    Screen Open 2,680,262,4,Hires+Laced
  541.    Curs Off : Flash Off : Cls 0 : Hide On 
  542.    Double Buffer : Autoback 0
  543.    Screen Display 2,125,35,,
  544.    Palette $5,$FFF,$999,$666
  545.    Screen Clone 3
  546.    Screen Display 3,,167,,
  547.    Screen To Front 5 : Screen To Front 6
  548.    Channel 0 To Screen Display 5
  549.  
  550. ` overlay too screens and move them in opposite directions
  551. ` making it look like one screen is being split
  552. ` use amal to move screens!
  553.  
  554.    Amal 0,"A:M 0,-160,160;"
  555.    Amal On 0
  556.    Channel 1 To Screen Display 6
  557.    Amal 1,"A:M 0,160,160;"
  558.    Amal On 1
  559.    Channel 2 To Screen Display 5
  560.    Amal 2,"A:M 0,160,160;"
  561.    Channel 3 To Screen Display 6
  562.    Amal 3,"A:M 0,-160,160;"
  563.    No Mask 
  564.    F=1
  565.    Palette $5,$FFF,$999,$666
  566.    Bob 1,150,270,131
  567.  
  568. ` draw one line copy down the screen, nice in interlaced hireds!
  569.  
  570.    Repeat 
  571.       For T=1 To 680 Step 28
  572.          Paste Bob T,0,F
  573.       Next T
  574.       For T1=28 To 260 Step 26
  575.          Screen Copy 2,0,0,680,26 To 2,0,T1
  576.          If Mouse Key Then FLAG=1 : If FLAG=1 Then Timer=0 : Amal On 2 : Amal On 3
  577.       Next T1
  578.       Screen Swap : Wait Vbl 
  579.       Inc F
  580.       If F=130 Then F=1
  581.       Z=Timer
  582.  
  583. ` use the timer(internal clock), to let a routine run for so long
  584. ` Remember set timer to zero (before entering a routine)
  585. ` Another thing with the timer, is that its takes less CPU time
  586. ` compared to a counter. eg inc count, until count=500.
  587.  
  588.    Until FLAG=1 and Z>180
  589.    Screen Close 2 : Screen To Front 1 : Screen Close 5 : Screen Close 6
  590.    Screen 1
  591.    Fade 2,$5,$F,$11F,$22F,$33F,$44F,$55F,$66F,$77F,$88F,$99F,$AAF,$BBF
  592.    Wait 25
  593. End Proc
  594.  
  595. Procedure MAKE_PICCY
  596.    Screen 1
  597.    Fade 2,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5
  598.    Wait 30
  599.    Screen Open 3,370,17,2,Lowres
  600.    Curs Off : Flash Off : Cls 0 : Hide On 
  601.    Screen Display 3,,278,,
  602.    Fade 1,$5,$FFF : Wait 2 
  603.    Screen Open 2,320,200,32,Lowres
  604.    Curs Off : Flash Off : Cls 0 : Hide On 
  605.    Unpack 9 To 2
  606.    Screen Display 2,,35,,
  607.    Palette $0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0
  608.    Load "df0:picpal"
  609.  
  610. ` load palette, which is quick and lazy way really!
  611.  
  612.    Fade 2 To -1 : Wait 25
  613.  
  614. ` scroll routine[screen number, xleft,yleft, depth,speed,colour,length]
  615.  
  616.    _SCROLL_ROUTINE1[3,0,0,14,2,2,318]
  617.  
  618.    Screen 0
  619.    Pop Proc
  620. End Proc
  621.  
  622. Procedure _SCROLL_ROUTINE1[SCRN,X,Y,SIZE,SPEED,_COL,AREA]
  623.    T$="^WELL LOOK AT THIS HAND DRAWN PICCY. QUALITY STUFF"
  624.    T$=T$+" . I HOPE THESE ROUTINES NOW"
  625.    T$=T$+" PROVE HOW MUCH CAN BE DONE WIH AMOS. THERES SO "
  626.    T$=T$+"MUCH MORE AND ITS GOOD TO SEE MUCH QUALITY CODE THESE"
  627.    T$=T$+" DAYS. ESPECIALLY FROM A NUMBER OF CODERS WHO WILL GET"
  628.    T$=T$+" A MENTION. ONE COMPLAINT THOUGH WHY IS IT THAT FOUR"
  629.    T$=T$+" MONTHS AGO JASON HOLBORN OF AMOS COLUMN IN AMIGA SHOPPER"
  630.    T$=T$+" STARTED UP A COMPO FOR MOVING SIXTY BOBS,SPRITES"
  631.    T$=T$+" AND DOING IT PARALLAX STARFIELD FASION. NOW ALL THAT"
  632.    T$=T$+" SEEMS TO HAVE BEEN FORGOTTEN, OR WAS IT BECAUSE NO ONE COULD"
  633.    T$=T$+" DO IT?. WELL MOST PARALLAX STARFIELDS IN AMOS DEMOS ARE EITHER"
  634.    T$=T$+" COLOUR CYCLED, DUAL PLAYFIELD, OR HAVE TWENTY ODD SPRITES. WHICH FRANKLY"
  635.    T$=T$+" IS NOW OLD. I HAVE WRITTEN A" 
  636.    T$=T$+" STARFIELD THAT HANDLES EIGHTY BOBS IN PARALLAX. SEE IT LATER."
  637.    T$=T$+" NOW FOR SOME GREETS            !"
  638.    T$=T$+"SHOCKWAVE   &*   "
  639.    T$=T$+"  AND JAG      &*"
  640.    T$=T$+"     FANATIX     &*"
  641.    T$=T$+"     SYNTEX      &*"
  642.    T$=T$+" GRAPHIC REALITY &*"
  643.    T$=T$+"     ZIRUS       &*"
  644.    T$=T$+"     FUMBLE      &*"
  645.    T$=T$+"    FUTURIZE     &*"
  646.    T$=T$+"   CYBERNETICS   &*"
  647.    T$=T$+"     CHROME      &*"
  648.    T$=T$+"      TSM        &^"
  649.    T$=T$+"   SPECIALS GREETS"
  650.    T$=T$+" LEN AND ANNE TUCKER. DAN. KYLE. KEITH. SIMON"
  651.    T$=T$+". TERRI. MIKE. MARK. STEVE. NIZ. PHILL. THATS IT"
  652.    T$=T$+" I HOPE YOU LIKE IT SO FAR. COMING UP RUBBER CUBE"
  653.    T$=T$+", SORRY ITS A MULTILOAD BIT BECAUSE I CAN T BE BOTHERED TO MERGE THE ROUTINE IN. SAD EH....................."
  654.    Screen Open SCRN,370,SIZE+4,2,Lowres
  655.    Screen Display SCRN,,AREA,,
  656.    Curs Off : Flash Off : Cls 0
  657.    Palette $5,$FFF
  658.    Polyline 0,0 To 340,0
  659.    Polyline 0,17 To 340,17
  660.    Channel 0 To Screen Display 3
  661.    Amal 0,"A:M 0,-40,40;"
  662.    Amal On 0
  663.    Repeat 
  664.       Inc CNT : If CNT>(20/SPEED) Then Gosub NEWLET
  665.       Screen Copy SCRN,X,Y+2,368,Y+SIZE+2 To SCRN,-SPEED,Y+2
  666.       Wait Vbl 
  667.    Until Mouse Key
  668.    Channel 0 To Screen Display 3
  669.    Amal 0,"A:M 0,45,45;"
  670.    Screen 2 : Fade 2,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5,$5 : Amal On 0 : Wait 35
  671.    Screen Close 2
  672.    Screen 1
  673.    Fade 2,$5,$111,$222,$333,$444,$555,$666,$777,$888,$999,$AAA,$BBB,$FFF,$5
  674.    Wait 25
  675.    Pop Proc
  676.    NEWLET:
  677.  
  678. ` although this is not as quick as amal, its the easy way out (again)
  679. ` there is a quicker way, but at the time of writing I have not
  680. ` included it. Although I`ve seen a few jerky scrollies, all blitter
  681. ` produced, so heres a few tips if you want to do smoother blitter stuff
  682. ` Dont use def scroll, use screen copy, it is faster
  683. ` Make sure you use autoback 0 (fastest screen mode)
  684. ` Store fonts as icons (if your using a fancy coloured font)
  685. ` I say this because your sprite banks will be more free 
  686. ` Use a fairly quick system, to retrieve the font letter you want
  687. ` Ie if your font bank has fonts of order ABCDEFGHIJKLMNOPQRSTUVWXYZ;.0123456789space
  688. ` now work out a suitable formula. What I did was to
  689. ` take the letter (read from string), get its ascii value, and take 64 from it
  690. ` giving you the icon position in the bank, now paste the icon and repeat
  691. ` obviously the routine will perform depending how you implement this
  692. ` Here I`ve included character suchs as !^&? to signal various speeds
  693. ` by changing a variable, and then move a blank space to it.
  694. ` There is a faster method, which gives you instant results,
  695. ` I may mention this later some time. But this should help.
  696.  
  697.    LET$=Mid$(T$,PNR,1)
  698.    T=Asc(LET$)-64
  699.    If LET$=" " Then T=40
  700.    If LET$="." Then T=27
  701.    If LET$="?" Then T=28
  702.    If LET$="," Then T=39
  703.    If LET$="!" Then T=40 : SPEED=1
  704.    If LET$="£" Then T=40 : SPEED=2
  705.    If LET$="$" Then T=40 : SPEED=3
  706.    If LET$="%" Then T=40 : SPEED=4
  707.    If LET$="^" Then T=40 : SPEED=5
  708.    If LET$="&" Then T=40 : Wait 50
  709.    If LET$="*" Then T=40 : SPEED=6
  710.    Paste Icon 340,Y+2,T
  711.    Inc PNR : If PNR>Len(T$) Then PNR=1
  712.    CNT=1
  713.    Return 
  714. End Proc
  715.  
  716. Procedure _INTRO_SETUP
  717.    Synchro Off 
  718.    Hide 
  719.    Screen 1
  720.    Fade 2 : Wait 30
  721.    Screen Open 2,310,230,4,Lowres
  722.    Curs Off : Flash Off : Hide On : Cls 0
  723.    Fade 3,$3,$FFF,$B,$F : Wait 45
  724.    Autoback 0
  725. End Proc
  726.  
  727. ` Sorry but I cant include this code, maybe later
  728. ` since this routine is the fastest I`ve yet seen
  729. ` Only 2-3 other coders I think could do it in Amos
  730. ` Also, I must stress, that the routine runs in 3 bpls
  731. ` because of fading text, but obviously runs a hell of a
  732. ` lot faster in 1 or 2. Also while I am writing this, I
  733. ` just come up with a version thats 4-5 times faster, but
  734. ` its need a bit more work. It runs as much smoother
  735. ` and now jerks
  736.  
  737. Procedure SET_UP_DETAILS
  738. End Proc
  739. Procedure MOVE_STARS
  740. End Proc
  741. Procedure ST1 
  742.    Screen Open 2,320,200,8,Lowres
  743.    Curs Off : Flash Off : Hide On : Cls 0
  744.    Autoback 0
  745.    Screen Display 2,,60,,
  746.    EXTRA
  747.    Screen 2
  748.    Fade 2,$3 : Wait 30
  749.    Palette $3,$222,$444,$666,$888,$AAA,$CCC,$FFF
  750. End Proc
  751. Procedure ST2
  752. End Proc
  753. Procedure ST3
  754.    Unpack 6 To 0
  755.    Screen Hide 
  756.    Screen To Front 3 : Screen To Front 4
  757.    Screen Display 0,,85,,
  758.    Screen Open 1,340,200,16,Lowres : Curs Off : Flash Off : Cls 0 : Hide On 
  759.    Get Palette 0
  760.    Autoback 0
  761.    Double Buffer 
  762.    Repeat 
  763.       Dec POS2 : Inc POS
  764.       Screen Copy 0,20,POS,290,POS+1 To 1,45,POS+30
  765.       Screen Copy 0,20,POS2,290,POS-1 To 1,45,POS2+30
  766.       Screen Swap : Wait Vbl 
  767.    Until POS=320
  768.    Wait 150
  769.    Fade 8 : Wait 120
  770.    Screen Close 0 : Screen Close 1 : Screen Close 2 : Screen Close 3 : Screen Close 4
  771.  
  772. End Proc
  773.  
  774. Procedure EXTRA
  775.    Screen Open 3,340,8,2,Lowres
  776.    Curs Off : Flash Off : Cls 0
  777.    Autoback 0
  778.    Palette $0,$FFF
  779.    Screen Display 3,112,60,,
  780.    Screen Open 4,340,8,2,Lowres
  781.    Curs Off : Flash Off : Cls 0 : Hide On 
  782.    Autoback 0
  783.    Palette $0,$FFF
  784.    Screen Display 4,112,260,,
  785.    X=1 : Q=340
  786.    For Q=340 To 0 Step -1
  787.       Screen 3 : Plot X,7 : Screen 4 : Plot Q,0
  788.       Inc X
  789.    Next Q
  790. End Proc
  791.  
  792. Procedure MULTI_SCROLL 
  793.    Screen 1 : Fade 2 : Wait 30
  794.    Screen Close 0 : Screen Close 1
  795.    Screen Open 3,340,75,16,Lowres
  796.    Unpack 12 To 3
  797.    Screen Display 3,112,170,,105
  798.    Screen Open 2,688,9,2,Hires
  799.    Curs Off : Flash Off : Cls 0 : Hide On 
  800.    Colour 0,$0 : Colour 1,$FFF
  801.    Autoback 0
  802.    Screen Display 2,,170,,
  803.    Screen Open 5,340,260,2,Lowres
  804.    Curs Off : Flash Off : Cls 0 : Hide On 
  805.    Palette $0,$FFF : Autoback 0
  806.    Screen Display 5,,36,,
  807.    Screen Open 6,710,29,2,Laced+Hires
  808.    Curs Off : Flash Off : Cls 0 : Hide On 
  809.    Autoback 0
  810.    Palette $0,$FFF
  811.    Screen Display 6,,287,,
  812.    _SCROLL_ROUTINE2[6,0,0,29,2]
  813. End Proc
  814.  
  815. Procedure _SCROLL_ROUTINE2[SCRN,X,Y,SIZE,SPEED]
  816.    SPEED=6
  817.    T$=" A Simple blitter scroll without using the slow def scroll"
  818.    T$=T$+" and not jerky either. It depends what you do to it. Hardware"
  819.    T$=T$+" is better and finally getting amal to do it makes all the difference"
  820.    T$=T$+" after a week of scratching my head its done, but its harder using"
  821.    T$=T$+" the blitter because the results tend to be more jerkier. Even when"
  822.    T$=T$+" the scrolls are smooth when its now compiled. Which just goes to"
  823.    T$=T$+" show how optimised the routine has to be. Although several of the"
  824.    T$=T$+" scrolls are batched together, some of the lines are independently"
  825.    T$=T$+" moved................................"
  826.    T2$=" YO PEOPLE MORE SCROLLY THEMES, ALL BLITTER"
  827.    T2$=T2$+" PRODUCED, NOT HARDWARE WHICH MAKES THINGS"
  828.    T2$=T2$+" A LOT HARDER IN REPECT OF QUALITY. SADLY"
  829.    T2$=T2$+" THIS MAY BE THE LAST DEMO FROM ME, FOR THE"
  830.    T2$=T2$+" SIMPLE REASON I HAVE LEARNT 'C' AND HAVE A"
  831.    T2$=T2$+" FAIR KNOWLEDGE OF ASM. 'C' IS FAR MORE POWERFUL"
  832.    T2$=T2$+" AND CAN DO FAR MORE THINGS. WHY? BECAUSE AMOS LACKS"
  833.    T2$=T2$+" INTUITION AND SPRITE MULTIPLEXING(1 pixel height)"
  834.    T2$=T2$+", AND OTHER THINGS. EVEN THE MUSIC SYSTEM IS USELESS"
  835.    T2$=T2$+" WHEN WAS THE AMOS MUSIC CONVERTER LAST UPDATED"
  836.    T2$=T2$+" UM 1991. EVEN THE START-TRECKER MODULE PLAYER"
  837.    T2$=T2$+" IS PATHETIC (PROTRACKER 2+) BEING THE NORM THESE DAYS"
  838.    T2$=T2$+". OK CALL YOUR MUSIC PLAYER THROUGH CLI, BUT THAT"
  839.    T2$=T2$+" OCCASIONALLY INTERFERES WITH THE AMOS INTERRUPT SYSTEM"
  840.    T2$=T2$+" SOMETHING WHICH YOU DONT WANT WHEN YOU MOVING"
  841.    T2$=T2$+" A LARGE NUMBER OF OBJECTS AROUND......................"
  842.    COUNT=1
  843.    Screen To Front 3
  844.    Screen To Front 2
  845.    Get Rom Fonts 
  846.    Set Font 4
  847.    GAP=22
  848.    Repeat 
  849.       Inc CNT : If CNT>3 Then Gosub NEWLET
  850.       Screen Copy SCRN,X,Y,710,SIZE To SCRN,-SPEED,Y
  851.       Screen Copy SCRN,0,0,345,28 To 5,0,0
  852.       Screen Copy 5,0,0,345,32 To 5,0,34 : Wait Vbl 
  853.       Screen Copy 5,0,0,345,66 To 5,0,70
  854.       Screen Copy 2,0,0,681,7 To 2,-3,0
  855.    Until Mouse Key
  856.    Screen 2 : Fade 1,,$0 : Wait 15
  857.    Screen 5 : Fade 1,,$0 : Wait 15
  858.    Screen 6 : Fade 1,,$0 : Wait 15
  859.    Screen 3 : Fade 4 : Wait 55
  860.    Rainbow Del 3
  861.    Screen Close 2 : Screen Close 5 : Screen Close 6
  862.    Screen 3 : Cls 0 : Paper 0 : Pen 1 : Locate 0,0 : Centre "Hang on loading multi-part...."
  863.    Fade 3,$0,$FFF : Wait 45
  864.    Pop Proc
  865.    NEWLET:
  866.    TEX$=Mid$(T$,PNR,1)
  867.    TEX2$=Mid$(T2$,PNR2,1)
  868.    If TEX$="I" Then GAP=19
  869.    If TEX$<>"I" Then GAP=24
  870.    Text 670,22,TEX$
  871.    Screen 2 : Text 670,6,TEX2$ : Screen SCRN
  872.    Inc PNR : If PNR>Len(T$) Then PNR=1
  873.    Inc PNR2 : If PNR2>Len(T2$) Then PNR2=1
  874.    CNT=1
  875.    Return 
  876. End Proc
  877.